﻿<div class="weui-tab">
    <div class="weui-tab__panel">
        <iframe id="iframe1" src="@Url.Action("Index","Student")" frameborder="0" border="0" width="100%" height="100%"></iframe>
    </div>
    <div class="weui-tabbar">
        <a onclick="clickTab(this);" dw-url="@Url.Action("Index","Student")" class="weui-tabbar__item weui-bar__item_on">
            <img src="@Url.Content("~/Content/logo.png")" alt="" class="weui-tabbar__icon">
            <p class="weui-tabbar__label">加入虚拟课堂</p>
        </a>
        <a onclick="clickTab(this);" dw-url="@Url.Action("MyCourse","Student")" class="weui-tabbar__item">
            <img src="@Url.Content("~/Content/logo.png")" alt="" class="weui-tabbar__icon">
            <p class="weui-tabbar__label">我的虚拟课堂</p>
        </a>
        <a onclick="clickTab(this);" dw-url="@Url.Action("MyInfo","Student")" class="weui-tabbar__item">
            <img src="@Url.Content("~/Content/logo.png")" alt="" class="weui-tabbar__icon">
            <p class="weui-tabbar__label">我的</p>
        </a>
    </div>
</div>
<script type="text/javascript">
    function clickTab(that) {
        $(".weui-tabbar__item").removeClass("weui-bar__item_on");
        $(that).addClass("weui-bar__item_on");
        var url = $(that).attr("dw-url");
        $("#iframe1").attr("src", url);
    }
</script>